package com.iogogogo.activity.annotation;

import com.iogogogo.activity.enums.ActivityEventEnum;
import com.iogogogo.activity.enums.ActivityTypeEnum;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Created by tao.zeng on 2022/6/15.
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Activity {

    /**
     * Sign string.
     *
     * @return 标志位 string
     */
    String sign() default "";

    /**
     * Type activity type enum.
     *
     * @return the activity type enum
     */
    ActivityTypeEnum type() default ActivityTypeEnum.TYPE_PERSON;

    /**
     * Event activity event enum.
     *
     * @return the activity event enum
     */
    ActivityEventEnum event() default ActivityEventEnum.EVENT_NONE;

    /**
     * Source string.
     *
     * @return the string
     */
    String source() default "";

    /**
     * Target string.
     *
     * @return the string
     */
    String target() default "";

    /**
     * Source type class.
     *
     * @return the class
     */
    Class<?> sourceType() default String.class;

    /**
     * Target type class.
     *
     * @return the class
     */
    Class<?> targetType() default String.class;

    /**
     * 返回值状态
     *
     * @return -1：无状态，0：失败，1：成功
     */
    int status() default -1;

    /**
     * Description string.
     *
     * @return the string
     */
    String description() default "";

    /**
     * Format string.
     *
     * @return the string
     */
    String format() default "";

    /**
     * 是否记录该日志
     *
     * @return condition result
     */
    boolean condition() default true;
}
